import * as actionTypes from './actionTypes';

export default function reducer(state = {}, action) {
	const {caption} = action;

	switch(action.type) {
		case actionTypes.INCREMENT:
			return {...state, [caption]: state[caption] + 1};
		case actionTypes.DECREMENT:
			return {...state, [caption]: state[caption] - 1};
		default:
			return state;
	}
}
			